﻿import idv.ben.gc4flash.chart.*;
import idv.ben.gc4flash.dataLine.*;
import idv.ben.gc4flash.encode.*;
import idv.ben.gc4flash.fill.*;
import idv.ben.gc4flash.util.*;
/**
* 編碼方式，決定 {@link idv.ben.gc4flash.dataLine.ChartDataSet} 中各數值或文字資料如何拼湊成提供給 Google Chart 的 URL 字串。<br>
* 參考 Google Chart API：<a href="http://code.google.com/apis/chart/#chart_data" target="_blank">http://code.google.com/apis/chart/#chart_data</a><br>
*/
class idv.ben.gc4flash.encode.EncodeType {
	/**
	* "s" = Simple encoding
	*/
	public static var ENCODE_TYPE_SIMPLE:String = "s";
	/**
	* "t" = Text encoding
	*/
	public static var ENCODE_TYPE_TEXT:String = "t";
	/**
	* "e" = Extended encoding
	*/
	public static var ENCODE_TYPE_ENTENDED:String = "e";
	/**
	* "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"<br>
	* 參考 Google Chart API：<a href="http://code.google.com/apis/chart/#simple_values" target="_blank">http://code.google.com/apis/chart/#simple_values</a>
	*/
	public static var SIMPLE_ENCODING:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
	/**
	* 以編碼字串取出編碼物件
	* @param encodeType 編碼字串：<br>
	*		<ul>
	*		<li>{@link #ENCODE_TYPE_SIMPLE} = "s"</li>
	*		<li>{@link #ENCODE_TYPE_TEXT} = "t"</li>
	*		<li>{@link #ENCODE_TYPE_ENTENDED} = "e"</li>
	*		</ul>
	* @return 實做 {@link idv.ben.gc4flash.encode.IEncode} 的編碼物件
	*/
	public static function getEncode(encodeType:String):IEncode {
		if (encodeType == ENCODE_TYPE_SIMPLE) {
			return new SimpleEncode();
		} else {
			return null;
		}
	}
}
